package com.apes.fn.mdm.supplierConfiguration;

import com.apes.fn.mdm.purchase.PurchasingGroup;
import com.apes.framework.jpa.repository.CustomRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.Map;

public interface SupplierBusinessScopeRepository extends CustomRepository<SupplierBusinessScope, String> {
    @Query(value = "SELECT * FROM mas_supplier_business_scope WHERE supplier_id = ?1 ", nativeQuery = true)
    List<SupplierBusinessScope> accordingSupplierFind(String supplierId);

    @Query("select a from SupplierBusinessScope a where a.supplierId.id = :supplierId")
    SupplierBusinessScope findBySupplierId(String supplierId);

    @Query(value = "SELECT * FROM mas_supplier_business_scope WHERE supplier_id in :supplierId ", nativeQuery = true)
    List<SupplierBusinessScope> accordingSupplierFind(List<String> supplierId);
}
